package com.ia2011.project1.domain;

import java.awt.Point;

import com.ia2011.project1.debug.Debug;
import com.ia2011.project1.math.Utils;

/**
 * Address of destination
 * @author andrewk
 *
 */
public class Address extends Debug {

	private Point coords;
	
	/**
	 * Constructor for generating random address (coordinates are generated with uniform distribution)
	 */
	public Address() {
		this.setCoords(new Point(Utils.getUniformDistribution(Constants.ROADS)*Constants.BLOCK_SIZE, Utils.getUniformDistribution(Constants.ROADS)*Constants.BLOCK_SIZE));
	}
	
	public Address(Point point) {
		this.setCoords(point);
	}
	
	public Address(Address address) {
		this.coords = new Point(address.getCoords());
	}

	public void setCoords(Point coords) {
		this.coords = coords;
	}

	public Point getCoords() {
		return coords;
	}

	@Override
	public void info() {
		info("Address object -> ("+getCoords().x+","+getCoords().y+")");
	}
	
	
}
